







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Gets or sets an item in the list, by index.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public override sealed T this[ int index ]{ get; set;} |
Visual Basic (Declaration) |
---|
Public Overrides NotOverridable Default Property Item ( _ index As Integer _ ) As T |
Visual C++ |
---|
public: virtual property T default[int index] { T get (int index) override sealed; void set (int index, T value) override sealed; } |
Parameters
- index
- Int32
The index of the item to get or set. The first item in the list has index 0, the last item has index Count-1.
Return Value
The value of the item at the given index.
Remarks
Gettingor setting an item takes time O(log N), where N is the number of items in the list.
To process each of the items in the list, using GetEnumerator() or a foreach loop is more efficient that accessing each of the elements by index.
Exceptions
Exception | Condition |
---|---|
System..::ArgumentOutOfRangeException | index is less than zero or greater than or equal to Count. |
See Also
BigList<(Of <T>)> Class
Wintellect.PowerCollections Namespace